using System.Web.Mvc;
using EPiAbstractions;
using EPiServer.Core;
using JoelAbrahamsson.PageTypes;

namespace JoelAbrahamsson.Web.Controllers
{
    public class TaglineController : Controller
    {
        private IDataFactoryFacade _dataFactoryFacade;

        public TaglineController(IDataFactoryFacade dataFactoryFacade)
        {
            _dataFactoryFacade = dataFactoryFacade;
        }

        public ActionResult Render(string mainController)
        {
            Start startpage = (Start) _dataFactoryFacade.GetPage(PageReference.StartPage);

            if (mainController == "Home")
                return View("Header", startpage);

            return View("Regular", startpage);
        }

    }
}
